﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace AG.Editor.UI
{
    public class AGEMainMenuMidiator
    {
        private MenuStrip _mainMenu;
        private Form _mainWindow;

        public AGEMainMenuMidiator(Form mainWindow, MenuStrip mainMenu)
        {
            _mainWindow = mainWindow;
            _mainMenu = mainMenu;
        }

        //private void AddF
        public void Clear()
        {
            //_mainMenu.Items.Clear();
            while (_mainMenu.Items.Count > 1)
            {
                _mainMenu.Items.RemoveAt(1);
            }
        }

        public ToolStripMenuItem AddMenu(ToolStripMenuItem item)
        {
            _mainMenu.Items.Add(item);
            return item;
        }


        void miClose_Click(object sender, EventArgs e)
        {
            _mainWindow.Close();
        }

        void miSaveProject_Click(object sender, EventArgs e)
        {
            //AGECommonCommand.SaveProject();
            MessageBox.Show("保存完毕", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }

        void miPublish_Click(object sender, EventArgs e)
        {
            //AGECommonCommand.PublishProject();
        }
    }
}
